#ifndef	ARCHIVE_H
#define	ARCHIVE_H

typedef struct gph_info GPH_INFO;

typedef struct bin_data {
	long		size;
	char		*buf;
} BIN_DATA;

typedef struct ar_info {
	char				*tag_n;
	long				offset;
	long				size;
	GPH_INFO			*info;
	BIN_DATA			*data;
	struct ar_info		*next;
} AR_DATA;

extern AR_DATA		ar_top;

#define	ar_get_top()			(ar_top.next)
#define	ar_get_next(ar)			(ar->next)
#define	ar_set_offset(ar, os)	(ar->offset = (os))
#define	ar_set_size(ar, sz)		(ar->size = (sz))

void ar_init(void);
void ar_finish(void);
AR_DATA *ar_create(char *s);

#endif
